#pragma once
#include "entityparameter.h"



template <class T>
class CustomEntityParameter :
	public EntityParameter
{

	T paramValue;

public:
	
	//static std::string TYPE_NAME;

	virtual void* getValue()
	{
		return (void*) &paramValue;
	}


	virtual void setValue(void* value)
	{
		paramValue = ((T) value);
	}

	virtual T getCustomValue()
	{
		return paramValue;
	}


	virtual void setCustomValue(T value)
	{
		paramValue = value;
	}


	CustomEntityParameter(std::string name)
	{

		//TYPE_NAME = "custom";

		this->name = name;
		this->type = "custom";
	}

	virtual int operator-(EntityParameter &param)
	{
		return (int) (paramValue - *((T*)param.getValue()));
	}

	~CustomEntityParameter(void){}
};

